package com.ostrich.module_player.adapter.provider

import androidx.databinding.DataBindingUtil
import com.chad.library.adapter.base.provider.BaseItemProvider
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ostrich.module_player.databinding.PlayerItemCommentTitleWhiteViewBinding
import com.ostrich.module_player.databinding.PlayerItemReplyViewBinding
import com.ostrich.module_player.entity.PlayerEntity

/**
 * @Author : yaotianxue
 * @Time : On 2023/11/3 14:57
 * @Description : ReplyProvider
 */
class ReplyProvider  (override val itemViewType: Int, override val layoutId: Int) :
    BaseItemProvider<PlayerEntity>() {
    override fun onViewHolderCreated(viewHolder: BaseViewHolder, viewType: Int) {
        DataBindingUtil.bind<PlayerItemReplyViewBinding>(viewHolder.itemView)
    }
    override fun convert(helper: BaseViewHolder, item: PlayerEntity) {
        helper.getBinding<PlayerItemReplyViewBinding>()?.viewModel = item
        helper.getBinding<PlayerItemReplyViewBinding>()?.executePendingBindings()
    }
}